<template>
  <view class="guide-container">
    <view class="guide-header">
      <view class="header-content">
        <text class="guide-title">轻松上手系统</text>
        <text class="guide-subtitle">带你玩转管理后台</text>
      </view>
      <image class="header-image" src="/static/guide-phone.png" mode="aspectFit"></image>
    </view>
    
    <view class="guide-content">
      <view class="guide-item" v-for="(item, index) in guideList" :key="index">
        <view class="item-icon">
          <image :src="item.icon" mode="aspectFit"></image>
        </view>
        <view class="item-content">
          <view class="item-header">
            <text class="item-title">{{item.title}}</text>
          </view>
          <text class="item-desc">{{item.description}}</text>
        </view>
        <view class="item-action">
          <button :class="['action-btn', item.status === 'done' ? 'btn-done' : '']">
            {{item.status === 'done' ? '去完成' : '领取奖励'}}
          </button>
          <text v-if="item.count" class="item-count">剩余{{item.count}}份</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      guideList: [
        {
          icon: '/static/guide/contract-5.svg',
          title: '邀请绑定纸质合同',
          description: '线上化统一管理，提升效率',
          count: 213,
          status: 'pending'
        },
        {
          icon: '/static/guide/Bankcard.svg',
          title: '绑定一张收款银行卡',
          description: '安全收租，实时核销',
          status: 'done'
        },
        {
          icon: '/static/guide/set.svg',
          title: '催租短信发送配置',
          description: '短信提醒，提升租客服务体验',
          status: 'done'
        },
        {
          icon: '/static/guide/group.svg',
          title: '加入专属多对一服务群',
          description: '功能讲解、案例分析、需求反馈',
          status: 'done'
        },
        {
          icon: '/static/guide/group.svg',
          title: '加入公寓达摩院知识社群',
          description: '免费课程，行业交流，业务拓展',
          status: 'done'
        },
        {
          icon: '/static/guide/wechat.svg',
          title: '绑定微信账号',
          description: '方便快捷，一键登录',
          status: 'done'
        }
      ]
    }
  }
}
</script>

<style lang="scss">
.guide-container {
  padding: 30rpx;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.guide-header {
  background-color: #1890ff;
  padding: 40rpx 30rpx;
  border-radius: 16rpx;
  margin-bottom: 30rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  
  .header-content {
    flex: 1;
  }
  
  .guide-title {
    font-size: 40rpx;
    color: #fff;
    font-weight: bold;
    margin-bottom: 16rpx;
    display: block;
  }
  
  .guide-subtitle {
    font-size: 24rpx;
    color: rgba(255, 255, 255, 0.8);
    display: block;
  }

  .header-image {
    width: 200rpx;
    height: 200rpx;
    margin-left: 20rpx;
  }
}

.guide-content {
  .guide-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 30rpx;
    border-radius: 16rpx;
    margin-bottom: 20rpx;
    
    .item-icon {
      width: 80rpx;
      height: 80rpx;
      margin-right: 20rpx;
      
      image {
        width: 100%;
        height: 100%;
      }
    }
    
    .item-content {
      flex: 1;
      
      .item-header {
        display: flex;
        align-items: center;
        margin-bottom: 10rpx;
      }
      
      .item-title {
        font-size: 32rpx;
        color: #333;
        font-weight: bold;
      }
      
      .item-desc {
        font-size: 24rpx;
        color: #666;
        line-height: 1.5;
      }
    }

    .item-action {
      margin-left: 20rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      
      .action-btn {
        font-size: 24rpx;
        color: #1890ff;
        background-color: transparent;
        border-radius: 16rpx;
        padding: 2rpx 6rpx;
        border: 0.5px solid #1890ff;
        margin-bottom: 8rpx;
        width: 140rpx;
        text-align: center;
        
        &.btn-done {
          color: #1890ff;
        }
      }

      .item-count {
        font-size: 20rpx;
        color: #999;
        margin-top: 4rpx;
      }
    }
  }
}
</style>